package com.example.sellersale.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.text.SimpleDateFormat;
import java.util.Date;

@TableName("sys_bill")
public class Bill {
    @TableId(type = IdType.ASSIGN_ID)
    private String id;//发票id
    private String billDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());//发票日期
    private String payType;//支付方式
    private Double spend;//花费
    private String userId;//用户id
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getBillDate() {
        return billDate;
    }

    public void setBillDate(String date) {
//        Date date = new Date();
//        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
//        String billDate = simpleDateFormat.format(date);
        this.billDate = date;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        System.out.println("我进来过");
        this.payType = payType;
    }

    public Double getSpend() {
        return spend;
    }

    public void setSpend(Double spend) {
        this.spend = spend;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "Bill{" +
                "id='" + id + '\'' +
                ", billDate='" + billDate + '\'' +
                ", payType='" + payType + '\'' +
                ", spend=" + spend +
                ", userId='" + userId + '\'' +
                '}';
    }
}
